Skip to content

Conversation

@asapach
Copy link
Contributor

@asapach asapach commented May 18, 2014

The tracker seems to mangle port information when returning peers in compact (binary) model. This PR illustrates the problem via a failing test:

    expected: '127.0.0.1:6881'
    actual:   '127.0.0.1:6895'

Two peers connect to the tracker: one on port 6881 and another on 6882. When receiving a response from the tracker the second peer expects to find the first one, but instead discovers an erroneous peer.

Consequently, when returning peers in non-compact (dictionary) model, the tracker seems to mangle IP information, but that's a separate issue.

@feross feross merged commit dfd235d into webtorrent:master May 19, 2014
feross added a commit that referenced this pull request May 19, 2014
The client was converting the binary (compact) response to a utf8
string which would modify the data in some cases. Keeping it as a
buffer the whole time solves the issue.

Fixes #19.
@feross
Copy link
Member

feross commented May 19, 2014

Thanks for the bug report.

The client was converting the binary (compact) response to a utf8 string which would modify the data in some cases. Keeping it as a buffer the whole time solves the issue.

Fixed and published as 0.7.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants